import 'package:flutter/material.dart';

//矩阵变换
class TransformWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: new AppBar(
          title: new Text("Transform"),
          leading: new BackButton(),
        ),
        body: new Center(
          child: Transform(
            transform: Matrix4.rotationZ(0.3),
            //旋转点，相对于左上角顶点的偏移。默认旋转点事左上角顶点。
            origin: Offset.zero,
            alignment: Alignment.topLeft,
            child: Container(
              color: Colors.blue,
              width: 100,
              height: 100,
            ),
          ),
        ));
  }
}
